if (require(dplyr) && require(magrittr)) {
## create a safeframe
x <- cars %>%
make_safeframe(
mph = "speed",
distance = "dist"
) %>%
mutate(result = if_else(speed > 50, "fast", "slow")) %>%
set_tags(ticket = "result")
x
## dangerous removal of a tagged column setting it to NULL issues warning
x[, 1] <- NULL
x
x[[2]] <- NULL
x
x$speed <- NULL
x
}
Run the code above in your browser using DataLab